package com.example.news.service;

import com.example.news.pojo.entity.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.news.pojo.form.BasePageQuery;
import com.example.news.pojo.form.CommentForm;
import com.example.news.pojo.form.UpdateCommentForm;
import com.example.news.pojo.vo.*;
import com.example.news.utils.result.PageResult;
import com.example.news.utils.result.Result;

/**
* @author 86147
* @description 针对表【comment】的数据库操作Service
* @createDate 2023-10-19 14:35:30
*/
public interface CommentService extends IService<Comment> {
    PageResult<MyCommentVo> getMyComment(String token, BasePageQuery basePageQuery);
    PageResult<FirstCommentVo> getFirstCommentByArticleId(Integer id, BasePageQuery basePageQuery);

    PageResult<SecondCommentVo> getSecondCommentByFirstId(Integer id, BasePageQuery basePageQuery);

    Result<ArticleCommentVo> getArticleCommentByArticleId(Integer articleId);

    Result<String> addComment(CommentForm commentForm);

    Result<String> deleteComment(Integer id);

    Result<String> updateComment(UpdateCommentForm updateCommentForm);

    PageResult<AllCommentVo> getALlComment(BasePageQuery basePageQuery, String token, String key);

}
